package cn.hy.preparelesson.common.enums;

/**
 * 备课类型枚举类
 */
public enum PrepareLessonTypeEnum {
    TEACHINGPLAN((byte)1, "教案"),
    UNITTESTANALYSIS((byte)2, "单元测试分析"),
    UNITTEACHINGANALYSIS((byte)3, "单元教学分析"),
    TEACHINGPLANANDPROGRESS((byte)4, "教学计划及进度"),
    ;
    private byte code;
    private String msg;

    PrepareLessonTypeEnum(byte code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    PrepareLessonTypeEnum() {

    }

    public byte getCode() {
        return code;
    }

    public void setCode(byte code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


    public static  PrepareLessonTypeEnum getByCode(Byte code) {
        if (code == null) {
            return null;
        }
        for (PrepareLessonTypeEnum value : PrepareLessonTypeEnum.values()) {
            if (value.code == code) {
                return value;
            }
        }
        return null;
    }
}
